1. Field
The subject matter herein relates generally to processing, and more particularly to approximation techniques used in hardware and software processing.
2. Background
Arithmetic shifts may be used to perform multiplication or division of signed integers by powers of two. Shifting left by n-bits on a signed or unsigned binary number has the effect of multiplying it by 2n. Shifting right by n-bits on a two's complement signed binary number has the effect of dividing it by 2n, but it always rounds down (i.e., towards negative infinity). Because right shifts are not linear operations, arithmetic right shifts may add rounding errors and produce results that may not be equal to the result of multiplication followed by the right shift.
In some implementations, the sign-symmetric algorithm may be used in an IDCT transform architecture or other digital filter.
One example of the use of arithmetic shifts is in fixed point implementations of some signal-processing algorithms, such as FFT, DCT, MLT, MDCT, etc. Such signal-processing algorithms typically approximate irrational (algebraic or transcendental) factors in mathematical definitions of these algorithms using dyadic rational fractions. This allows multiplications by these irrational fractions to be performed using integer additions and shifts, rather than more complex operations.